package cash.cmp.personal_financial_system.service;

import cash.cmp.personal_financial_system.model.account.Account;
import cash.cmp.personal_financial_system.model.Role;
import cash.cmp.personal_financial_system.utils.Result;
import com.alipay.api.AlipayApiException;

import java.io.IOException;
import java.util.List;

public interface AccountService {
    //这个地方不要两个密码，前端验证是否重复，只传一个密码
    public Result register(String tel, String password, String username);

    //public Map<String, String> getToken(String username, String password);

    public Account getAccount(String tel);



    public Account accountLogin(String tel, String password);

    public List<Role> getAccountRolesById(Integer id);

    public Boolean giveAccountRolesById(Integer id,String name);

    public Boolean updateAccount(Account account);

    public Boolean updateObjectID(Integer id, Integer objectId);

    public Boolean deleteAccount(Integer id);

    public Boolean saveList(List<Account> list);

    // 微信登录验证
    Account loginByWx(String code);

    Account loginByApiPay(String code) throws AlipayApiException, IOException;

}
